<template>
    <div>
        <mbx lenev="用户管理" lenev1="角色列表" lenev2="权限管理"></mbx>
 <el-card class="box-card"  style="margin-top:20px">
        <el-table
    :data="data"
    style="width: 100%;"
    border
    stripe>
    <el-table-column
      label="#"
      type="index"
      width="180">
    </el-table-column>
    <el-table-column
      prop="authName"
      label="权限名称"
      width="180">
    </el-table-column>
    <el-table-column
      prop="path"
      label="路径">
    </el-table-column>
     <el-table-column
      prop="level"
      label="权限等级">
      <template slot-scope="scope">
        <div>
            <el-tag :type="obj[scope.row.level]">{{scope.row.level|qxian}}</el-tag>
        </div>
      </template>
      
    </el-table-column>
  </el-table>
  </el-card>
    </div>
</template>

<script>
export default {
    data() {
        return {
             data:[],
             obj:{
                 0:'',
                 1:'success',
                 2:'warning'
             }
        };
    },
    created() {
       this.get()
    },
    methods: {
       async get(){
           const res=await this.$API.LjhQuan()
           console.log(res)
           this.data=res
       }
    },
    watch:{

cart: {

handler(newValue) {

},
deep: true,

immediate:true,
},
    },
};
</script>

<style scoped lang='scss'>
  .el-table .warning-row {
    background: oldlace;
  }

  .el-table .success-row {
    background: #f0f9eb;
  }
</style>
